<script>on mouseUpget textStyle of clickChunk()if it contains "group" thenif textfont of clickChunk() is "Monaco" thendo clickText()else if it contains italic thenfind clickText() in bg fld "Topic"if the result is not empty then put the resultend ifend ifend mouseUp</script>
</part>
<content>
<layer>background</layer>
<id>103</id>
<text>Command List</text>
</content>
<content>
<layer>card</layer>
<id>1</id>
<text><span class="style6">djustSize</span><span class="style2">This command tells the object to revert to its natural size. It has the same effect as having the object’s autosize property set to true, but it does not affect the autosize property. </span><span class="style6">BringToFront</span><span class="style2">This puts the window in front of all the others in HyperCard’s application layer.</span><span class="style6">Clear</span><span class="style2">This command may be sent to text and QuickTime objects. It is similar to its edit menu equivalent. </span><span class="style6">Copy</span><span class="style2">This command may be sent to text objects, or lists or QuickTime objects whose wantsFocus property is true. It is similar to its edit menu equivalent. For lists, it places a copy of the selected line onto the clipboard. For movies, it puts a copy of the selected frames onto the clipboard.</span><span class="style6">Cut</span><span class="style2">This command may be sent to text or QuickTime objects. It is similar to its edit menu equivalent. This command, unlike copy, does not work with lists. </span><span class="style6">DeleteItem </span><span class="style2">This command deletes the object from the window. All objects beyond that object will be renumbered. </span><span class="style6">DoUpdate</span><span class="style2">Redraws the object. This is used internally; it’s rare that you would need it.</span><span class="style6">First</span><span class="style2">For QuickTime objects. This moves to the first frame of the movie.</span><span class="style6">GetBGFieldText</span><span class="style2">This command may be sent to a text object. It will cause a copy of the text found in the background field (whose name is the same as the text object’s) to be copied into the object. All text styling will also be copied. This only works for fields on the current background.</span><span class="style6">GetCdFieldText</span><span class="style2">This command may be sent to a text object. It will cause a copy of the text found in the card field (whose name is the same as the text object’s) to be copied into the object. All text styling will also be copied. This only works for fields on the current card.</span><span class="style6">Last</span><span class="style2">For QuickTime objects. This moves to the last frame of the movie.</span><span class="style6">Paste</span><span class="style2">This command may be sent to text or QuickTime objects. It is similar to its edit menu equivalent. </span><span class="style6">Pause</span><span class="style2">For QuickTime objects. This pauses the playing of a movie.</span><span class="style6">Play</span><span class="style2">For QuickTime objects. This plays the movie at the current speed.</span><span class="style6">Prev</span><span class="style2">For QuickTime objects. This moves to the previous frame of the movie. </span><span class="style6">Next</span><span class="style2">For QuickTime objects. This moves to the next frame of the movie. </span><span class="style6">SendToBack</span><span class="style2">For windows. This puts the window behind all the other windows in HyperCard’s application layer.</span><span class="style6">SnapShot</span><span class="style2">For windows. This command places a picture of the window as it appears onto the clipboard. The picture will be in PICT format.</span><span class="style6">Stop</span><span class="style2">For QuickTime objects. This stops the playing of the movie.</span><span class="style6">ZoomIn</span><span class="style2">This command causes the window to zoom in to its minimum size. If the window has a grow box, then it will zoom in to the last size chosen by the user. If the window has no grow box, it will zoom to the minimum size as defined by the MinSize property.</span><span class="style6">ZoomOut</span><span class="style2">This command causes the window to zoom out to its maximum size as defined by the MaxSize property.</span></text>
</content>
<name> Command List</name>
<script></script>
</card>
card_9688.xml
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE card PUBLIC "-//Apple, Inc.//DTD card V 2.0//EN" "" >
<script>on mouseUpget textStyle of clickChunk()if it contains "group" thenif textfont of clickChunk() is "Monaco" thendo clickText()else if it contains italic thenfind clickText() in bg fld "Topic"if the result is not empty then put the resultend ifend ifend mouseUp</script>
</part>
<content>
<layer>background</layer>
<id>103</id>
<text>Property List</text>
</content>
<content>
<layer>card</layer>
<id>1</id>
<text><span class="style2">isted below are all the properties WindowScript uses. Not all are available from the property picker. Properties unavailable from the property picker are marked with an asterisk (*). To change or view a property that isn‚Äôt in the picker, you can use set or get in the message box or from the script of an object. </span><span class="style6">AutoClose = [TRUE, FALSE]</span><span class="style2">This is a property of push buttons. If true, the window will be closed in response to clicking on the button. Advanced Users: Returning a non-empty value in a button‚Äôs object script will prevent it from requesting that the window be closed. (You can use the ‚Äúreturn‚Äù command in object scripts or handlers called by object scripts, just like functions.) </span><span class="style6">AutoSize = [TRUE, FALSE]</span><span class="style2">Determines whether or not an object will snap back to its natural size. If true then the bottom right of the object will be adjusted. ‚ÄúNatural‚Äù varies, obviously, from object to object. A button‚Äôs natural height is 20 pixels; an icon‚Äôs natural height is 32 pixels; a text object‚Äôs natural size is an even multiple of the font size. </span><span class="style6">Balloon = [text | name | x ]</span><span class="style2">This is a property of all objects. It is the text which will appear in a help balloon when help has been enabled and the cursor is placed over the object. This property can also be set to the name or ID of a picture resource, which will be displayed in the balloon instead of text. (Balloon help is only available for Macs running System 7, although you can set this property under either System.) Advanced Users: There is a set of string resources which provide default text for each type of object. These may be changed to better suit your particular application. There is a resource for each object, named ‚ÄúBalloon4Object‚Äù, where object is the type of object.</span><span class="style6">BlackColor = [RED, GREEN, BLUE]</span><span class="style2">This is a property of all objects. On Macs capable of displaying color, it defines the color that should be used in place of black when drawing the object. The color is specified as a RGB value. Be careful when choosing colors for windows that may be used on black and white or less colorful monitors. The colors will map to the nearest color available, or to black if the monitor is black and white. Advanced users: This property may also be set with an index into the system CLUT id 256. The external function AnswerColor may be used to prompt a user for a color with the standard color picker. See Chapter 10 for more details.</span><span class="style6">CancelItem = [TRUE, FALSE]</span><span class="style2">This is a property of push buttons. If true, a command-period will be treated as being equivalent to clicking on this object. Advanced Users: This object has special significance to what is returned for modal dialogs. When the CancelItem closes a dialog, empty is returned as the value from WindowScript ‚Äî regardless of what value was requested in Result or what value was explicitly set of the window as a whole. </span><span class="style6">*Commands = [commands]</span><span class="style2">This is a read-only property of all objects. It returns the names of all the commands supported by that object. </span><span class="style6">DefaultItem = [TRUE, FALSE]</span><span class="style2">This is a property of push buttons. If true, pressing the Enter key will be treated as being equivalent to clicking on this object. So will a Return if the cursor is not currently in an edit field with a visible scroll bar.</span><span class="style6">*Dirty = [TRUE, FALSE]</span><span class="style2">This is a property of text objects. This property is automatically set to true whenever anything is typed into a field. If true, a hit will be sent when the field is tabbed out of or the user clicks outside the field. If you set dirty to false, a hit will immediately be sent if the field had been dirty. If that message returns a non-empty result, the field will remain dirty. Advanced Users: This is also a read-only property of the window as a whole. In this case, it will return the object number of the dirty edit field, or zero if there is none.</span><span class="style6">Disabled = [TRUE, FALSE]</span><span class="style2">This is a property of all objects. If true, then object will appear ‚Äúgrayed out‚Äù and will not respond to typing or clicking.</span><span class="style6">DoubleClickItem = [i]</span><span class="style2">This is a property of lists. If not zero, a double click on an object in the list will be treated as being equivalent to clicking on object i. Either the actual object number or the name of the object may be specified.</span><span class="style6">File = [file name]</span><span class="style2">This is a property of QuickTime movie objects. It is the file name of a QuickTime movie.</span><span class="style6">Fill = [NONE, WHITE, BLACK, GRAY, LTGRAY, DKGRAY, x]</span><span class="style2">This is a property of boxes. It specifies the pattern used to fill the contents of the box. Advanced Users: Other patterns in the system‚Äôs pattern list may be specified by x, an index value into the system pattern list. See Inside Macintosh Vol. 1 for more information.</span><span class="style6">Grid = [x, y]</span><span class="style2">This is a property of pictures. It specifies how the object is divided into separate cells. For example, Grid: 2,3 would split the object into six cells, two across and three down. A grid may not contain more than 32 cells.</span><span class="style6">GrowItem = [TRUE, FALSE]</span><span class="style2">This is a property of any object. When true, the object will be resized whenever the window is resized. Objects whose bottom exactly coincides with the grow object‚Äôs bottom will also be resized. Likewise, objects whose right side exactly coincides with the grow object‚Äôs right side will be resized. All objects completely below the grow object will be moved so as to stay below it. Likewise, all objects completely to its right will be moved to stay to its right. Only one object may be specified as the GrowItem.</span><span class="style6">*Handle = [handle]</span><span class="style2">This is a property of all objects except box, line and round box objects. It provides access to the low-level toolbox structures used by WindowScript. Never change information in these structures if you know what‚Äôs good for you. Advanced Users: You can set the handle of a picture object to a PICT you have somehow created or gotten a handle to. WindowScript will dispose of the handle to the PICT for you when the window is closed.</span><span class="style6">HasCloseBox = [TRUE, FALSE]</span><span class="style2">This is a property of the window. It determines if a window will have a close box. </span><span class="style6">HasGrowBox = [TRUE, FALSE]</span><span class="style2">This is a property of the window. It determines if a window will have a grow box in the lower right-hand corner. If a grow box is specified, scrollbars will also appear. Since dialogs do not have grow boxes, this property is ignored for dialogs.</span><span class="style6">HasTitleBar = [TRUE, FALSE]</span><span class="style2">This is a property of the window. It determines if a window will have a title bar. In the case of a windoid, this property will enlarge or reduce the title bar, not remove it.</span><span class="style6">HasZoomBox = [TRUE, FALSE]</span><span class="style2">This is a property of the window. It determines if a window will have a zoom box. Since dialogs do not have zoom boxes, this property is ignored for dialogs.</span><span class="style6">Height = [x]</span><span class="style2">This is a property of all objects. It specifies the height of the object.</span><span class="style6">Hilite = [TRUE, FALSE]</span><span class="style2">This is a property of radio buttons, checkboxes and controls. It is true if the object is ‚Äúchecked.‚Äù Advanced Users: This is also a property of icons when their logic property has been set to Radio or Check.</span><span class="style6">HitMessage = [message name]</span><span class="style2">This is a property of the window. It is the name of the handler which will be responsible for interacting with the user. This handler is called by WindowScript whenever anything happens in the window. See Chapter 9 for more information.</span><span class="style6">*ID = [x]</span><span class="style2">This is a property of icons and pictures. It is the actual id of the resource to be displayed as the object. It is also a property of the window as a whole ‚Äî in this case it is a unique identifier for the window. This id changes each time the window is displayed with WindowScript.</span><span class="style6">*IdleDelay = [x]</span><span class="style2">This is a property of the window as a whole. It enables windows to request that idle messages be sent to the hit handler (or the window's script, if present). X defines how often (in ticks, which are 1/60ths of a second) the messages are to be sent.</span><span class="style6">*ItemList = [list of objects]</span><span class="style2">This is a read-only property of the window. It returns a return delimited list of the objects in the window.</span><span class="style6">*Inset = [x]</span><span class="style2">This is a property of text objects. It controls the amount of space between the frame of the object and the text itself. It defaults to 3 for 12 point text and higher and to 2 for smaller sizes. This is similar to the wideMargins property of a HyperCard field.</span><span class="style6">*ItemType = [WIND, PUSH, RAD, CHK, CNTL, LBL, TEXT, ICN#, ICON, PICT, LIST, POP, BOX, LINE, RBOX, MOOV]</span><span class="style2">This is a read-only property of all objects. It specifies the kind of object it is. Only object number 0 may be of type WIND.</span><span class="style6">*KeyFilter = [KeyΔí resource name or ID]</span><span class="style2">This is a property of text objects. A KeyFilter controls what characters may be typed into a field. For example, OnlyDigits does not allow any keys except the digit keys to work in a text object which uses this filter. Custom ones may be added. See Chapter 14 for more information.</span><span class="style6">KeyScroll = [TRUE, FALSE]</span><span class="style2">This is a property of lists and QuickTime objects.If it is true, then all keystrokes and edit menu commands will be intercepted by the object when it has the focus ‚Äî when it has been clicked on or tabbed to. Tab will move the focus to the next object that wants it. Lists will scroll to and select the first item in the list which matches the key typed. Arrow keys may also be used to manipulate the selection. Note: This is the same as the wantsFocus property.</span><span class="style6">Leap = [x]</span><span class="style2">This is a property of a control. It determines by how much the controls value should change as a result of clicking in the ‚ÄúPage-Up‚Äù or ‚ÄúPage-Down‚Äù region of the control.</span><span class="style6">LineHeight = [SINGLE, DOUBLE, TRIPLE, x] </span><span class="style2">This is a property of text objects. It determines the vertical line spacing of the text. It may be set to pre-defined values which vary according to the font size, or may be set to a fixed number. Advanced Users: When dealing with text objects that contain mixed styles, the rules change slightly. A lineheight of Single is interpreted to mean variable line heights as needed to accommodate the various sizes of text which potentially might appear on a line. Double and Triple will not double and triple this line-by-line height but rather set a fixed height for all lines based on the base style designated by the texfont and textstyle property. </span><span class="style6">LockText = [TRUE, FALSE]</span><span class="style2">This is a property of text objects. It determines if the contents of the object may be selected and changed.</span><span class="style6">Logic = [NONE, ANY, SINGLE, CONTIGUOUS, DRAG]</span><span class="style2">This is a property of lists. It determines what logic governs selections. NONE prevents any selection from being made. ANY allows any set of list objects to be selected. SINGLE allows only a single item to be selected. CONTIGUOUS allows only a single, contiguous block of list items to be selected. DRAG allows only a single item to be selected but also allow any item to be repositioned in the list by dragging. Advanced Users: The List Manager keeps a field for each list, selFlags, that governs the selection. You can set this field yourself by putting the value you want for selFlags into the logic property. For more information on the List Manager, see Inside Macintosh Vol. IV.</span><span class="style6">Logic = [NONE, PUSH, RADIO, CHECK]</span><span class="style2">This is a property of icons and pictures. It determines what logic governs selections within the parts of the object (as divided by the Grid property). NONE prevents any selection from being made. PUSH allows any single part to be selected ‚Äî it is immediately deselected. RADIO allows any single part to be selected at a time ‚Äî it remains selected. CHECK allows a set of parts to be selected at a time.</span><span class="style6">Max = [x]</span><span class="style2">This is a property of controls. It determines the maximum value that the control may have.</span><span class="style6">MaxSize = [x]</span><span class="style2">This is a property of the window as a whole. It defines the maximum size of the window. It is used during zooming and resizing.</span><span class="style6">*MenuBar = [MBAR resource name]</span><span class="style2">This is a property of the window as a whole. It specifies a menubar (MBAR) resource which lists the menus for the window. It may be used instead of the Menus property discussed below.</span><span class="style6">Menus = [m1 & return & m2 ...]</span><span class="style2">This is a property of the window as a whole. It specifies the names (or ids) of the menus which are to appear in the menubar when the window has ‚Äúedit‚Äù ‚Äî when keypresses will go to the window.</span><span class="style6">Min = [x]</span><span class="style2">This is a property of controls. It determines the minimum value that the control may have.</span><span class="style6">MinSize = [x]</span><span class="style2">This is a property of the window as a whole. It defines the minimum size of the window. It is used during zooming and resizing.</span><span class="style6">Name = [name]</span><span class="style2">This is a property of all objects. It is the name of the object. In the case of the window, push buttons, radio buttons, checkboxes and controls, the name entered into the property picker appears. In the case of text, lists, boxes and popups, the name defaults to the first line of the text of the object, but may be set to anything. In the case of icons or picture objects, the name is that of the graphic resource being displayed as that object; if set, it attempts to display a picture resource by that name. </span><span class="style6">Number = [x]</span><span class="style2">This is a property of all objects. It is a sequential number assigned to each object in turn as it is created. The window itself always has a number of 0. This sequence controls the front-to-back layering of objects and radio button grouping.</span><span class="style6">*NumberOfItems = [x]</span><span class="style2">This is a property of the window as a whole. It is the count of objects in the window, not including the window itself. Advanced Users: This property may be set to a value less than the current one, which has the effect of deleting all objects beyond that point.</span><span class="style6">Params = [parameter map]</span><span class="style2">This is a property of windows. It is a return-delimited list of object properties to be set by additional parameters in the initial call to WindowScript. For more information, see the end of this chapter.</span><span class="style6">Pen = [NONE, WHITE, BLACK, GRAY, LTGRAY, DKGRAY, x]</span><span class="style2">This is a property of boxes. It specifies the pattern used to draw the outline of the box. Advanced Users: Other patterns in the system‚Äôs pattern list may be specified by x, an index value into the system pattern list. See Inside Macintosh Vol. 1 for more information.</span><span class="style6">Pensize = [x,y]</span><span class="style2">This is a property of boxes. It specifies the width (x) and height (y) of the pen used to draw the box. </span><span class="style6">*Properties = [properties]</span><span class="style2">This property has two different meanings. When setting it, it is used to set a group of properties all at once. The property value should look like a return-delimited list where each line of that list is of the form: </span><span class="style9"> ObjectName_Property: PropertyValue </span><span class="style2">When getting it, it returns the names of all the properties of that object. (See the Notes chapter for more details.) Advanced Users: The supported properties of each object are are stored in a TEXT resource in WindowScript.</span><span class="style6">Rect = [l,t,r,b]</span><span class="style2">This is a property of all objects. It is the rectangle in which a particular object is displayed. The coordinates are usually given relative to the TopLeft of the window. The window‚Äôs rect, however, is given relative to the screen as a whole.</span><span class="style6">Repeating = [TRUE, FALSE]</span><span class="style2">This is a property of QuickTime movie objects. If it is true, the movie will begin again from the first frame when it has reached the end.</span><span class="style6">Result = [result map]</span><span class="style2">This is a property of windows. It is a return-delimited list of object properties to be returned by the WindowScript function. For non-modal dialogs, the value of the window is controlled by this property. For more information, see the end of this chapter.</span><span class="style6">Script = [text]</span><span class="style2">This is a property of all objects. It is a set of HyperTalk statements which will be executed when that object is ‚Äúhit.‚Äù For windows, this means window events such as activate, deactivate, and open. For objects scripts, this means when a click appropriate for the object is detected. For instance, buttons are hit on mouse-up; edit text objects are hit on close field. An object script takes precedence over the window‚Äôs hit handler. See the Scripting chapter.</span><span class="style6">*Scroll = [vertical] | [vertical,horizonal]</span><span class="style2">For text objects, lists and pictures, scroll indicates the value of the scrollbar‚Äôs thumb, when present, in pixels. For QuickTime objects, it represents the value of the scrollbar‚Äôs thumb in whatever units the movie was recorded in. Note: For a movie, the scroll divided by the timeValue equals seconds elapsed.</span><span class="style6">Scrolling = [TRUE, FALSE]</span><span class="style2">This is a property of text objects, lists, QuickTime objects and pictures. It determines the presence of a scrollbar attached to the object. Whereas lists and text objects get only a vertical scrollbar, pictures get both horizonal and vertical scrollbars. QuickTime objects get their special QuickTime controller.</span><span class="style6">*Selection = [i]</span><span class="style2">This is a property of the window. It indicates the object which is currently selected. Only objects which can receive keystrokes are considered to be selected. LIST objects (whose keyScroll is TRUE) and TEXT objects (whose lockText is FALSE) can accept keystrokes. Windows that have menus, or that have a cancelItem or a defaultItem, can also receive keystrokes. Advanced Users: Setting the selection to 0 has a special meaning ‚Äî it causes the window to select the first appropriate object in the window. This comes in handy to ensure the edit goes to a particular window. </span><span class="style6">*Selection = [s1,...,sx]</span><span class="style2">This is a property of lists, popups, QuickTime objects and grids. It is a comma-delimited list of the selected items in the object. In the case of lists, the selection may also be specified using ranges such as ‚Äú1-5‚Äù or even groups of ranges such as ‚Äú1-5,10-35.‚Äù For QuickTime objects, it is the first and last unit of the selection, in whatever units the movie uses (probably frames).</span><span class="style6">*SelectionColor = [RGB color]</span><span class="style2">This is a property of text objects. It controls the color of the currently selected text in the object. For text objects that don‚Äôt use mixed styles, use the blackColor instead.</span><span class="style6">*SelectionFont = [font name]</span><span class="style2">This is a property of text objects. It controls the font of the currently selected text in the object. For text objects which do not have mixed styles, use the TextFont property instead.</span><span class="style6">*SelectionRect = [l,t,r,b]</span><span class="style2">This is a read-only property of lists. It returns the coordinates of the first object selected in a list. It will scroll the list if necessary to make the selection visible. This is very handy for making edit-in-the-list windows ‚Äî this rect may be used to place an edit object over the selection.</span><span class="style6">*SelectionSize = [font size]</span><span class="style2">This is a property of text objects. It controls the size (in points) of the currently selected text in the object. For text objects which do not have mixed styles, use the TextSize property instead.</span><span class="style6">*SelectionStyle = [PLAIN, BOLD, ITALIC, UNDERLINE, SHADOW, OUTLINE, CONDENSE, EXTEND, GROUP]</span><span class="style2">This is a property of text objects. It controls the style of the currently selected text in the object. For text objects which do not have mixed styles, use the TextStyle property instead.</span><span class="style6">*SelectionStyle = [HILITE, INVERT, FRAME, LASSO]</span><span class="style2">This is a property of pictures and icons whose logic is not none. When a picture or icon is selected, this property determines how that selection is indicated. Hilite uses the hilite color (on color machines). Invert simply inverts the colors. Frame draws a black border. Lasso shrinks the selection color so it covers just the graphic. It shrinks the hilite to cover the area inside the blackColor of the object. (Lasso should be used only with push logic.)</span><span class="style6">*SelectionText = [t1 & return & ... & return & tx]</span><span class="style2">This is a property of lists. It is a return-delimited list of the text of selected objects in the list. If this property is set, the selection of the list is changed rather than the text of the selected objects. See TextOfSelection.</span><span class="style6">*SelectionTime = [time start,time stop]</span><span class="style2">This is a property of QuickTime objects. It returns the selection of the movie in seconds.</span><span class="style6">*SoundVolume = [volume]</span><span class="style2">This is a property of QuickTime movie objects. It is the volume at which the movie‚Äôs sound will be played. You specify the volume as a percentage; for instance, ‚Äú100‚Äù would be full volume.</span><span class="style6">*Speed = [speed]</span><span class="style2">This is the speed to play the movie at, represented as a percentage of full speed. ‚Äú50‚Äù would be half speed, and ‚Äú200‚Äù would be double speed.</span><span class="style6">Step = [x]</span><span class="style2">This is a property of a control. It determines by how much the controls value should change as a result of clicking in the ‚ÄúLine-Up‚Äù or ‚ÄúLine-Down‚Äù region of the control.</span><span class="style6">Style = [DIALOG, WINDOW, WINDOID]</span><span class="style2">This is a property of a window. It determines how the window appears and in which layer it is placed. Advanced Users: You may specify any WDEF as the style. If you do, you must also specify one of the above in the Logic property of the window. </span><span class="style6">Style = [CDEF Name]</span><span class="style2">This is a property of a control. It is the name of the resource which defines the custom behavior of the object. Advanced Users: You can specify the name or ID of any CDEF that exists in the stack.</span><span class="style6">Style = [LDEF Name]</span><span class="style2">This is a property of a list. It is the name of the resource which defines the custom behavior of the object. Advanced Users: You can specify the name or ID of any LDEF that exists in the stack.</span><span class="style6">Style = [MDEF Name]</span><span class="style2">This is a property of a popup object. It is the name of the resource which defines the custom behavior of the object. Advanced Users: You can specify the name or ID of any MDEF that exists in the stack.</span><span class="style6">StyleRun = [Selection; selectionFont; SelectionSize; SelectionStyle; SelectionColor]</span><span class="style2">This property is not used while the window is open. It is only used when the window is saved, to indicate a style for a set of characters in a text object. You may see it if you open a window as text. </span><span class="style6">Text = [text]</span><span class="style2">This is a property of popups, lists, text objects and boxes. It is the actual contents of those objects.</span><span class="style6">TextAlign = [LEFT, CENTER, RIGHT]</span><span class="style2">This is a property of text objects. It determines the alignment of the text within its rect.</span><span class="style6">TextFont = [font name]</span><span class="style2">This is a property of all objects. It determines the font in which the text of the object will be drawn. If you change the TextFont of the window, each object within the window which had the same font will be changed also.</span><span class="style6">*TextOfSelection = [t1 & return & ... & return & tx]</span><span class="style2">This is a property of lists. It is a return-delimited list of the text of selected objects in the list. If this property is set, the text of the selected objects is changed, rather than the selection of the list. To do the inverse, use the selectionText property.</span><span class="style6">TextSize = [x]</span><span class="style2">This is a property of all objects. It determines the size in which the text of the object will be drawn. If you change the TextSize of the window, each object within the window which had had the same TextSize will be changed also. If you want to change the size of a portion of a text field, it must first be selected and then its selectionSize property be set.</span><span class="style6">TextStyle={PLAIN, BOLD, ITALIC, UNDERLINE, SHADOW, OUTLINE, CONDENSE, EXTEND}</span><span class="style2">This is a property of text objects. It determines what style effects are used in drawing the text of the object. It is a comma-delimited list of all the applicable styles. If you want to change the font of a portion of a text field, it must first be selected and then its selectionStyle property be set. </span><span class="style6">TimeValue = [time]</span><span class="style2">This is a property of QuickTime objects. It is the number of units (probably frames) per seconds for the movie. Note: scroll / timeValue = seconds elapsed</span><span class="style6">TitleItem = [x]</span><span class="style2">This is a property of popups. It specifies another object (usually a label) which is to act as the title for the popup. This title will be hilited when the popup is ‚Äúpopped.‚Äù</span><span class="style6">TopLeft = [x,y]</span><span class="style2">This is a property of all objects. It specifies the location of the top-left corner of the object‚Äôs enclosing rectangle, relative to the window. In the case of the window, it is relative to the screen.</span><span class="style6">*Value = [SelectionText] | [Hilite] | [Text]</span><span class="style2">This is a property of all objects. It represents the most ‚Äúinteresting‚Äù property of the object. In the case of push buttons, radio buttons and checkboxes, it is the hilite. In the case of controls it is the value of the control. In the case of popups and single selection lists, it is the SelectionText. In the case of pictures and lists capable of multiple selection, it is the Selection. Finally, in the case of a box, rounded box or line, it is empty.</span><span class="style6">*Version = [version]</span><span class="style2">This is a read-only property of the window. It returns the version of WindowScript being used. </span><span class="style6">Visible = [TRUE, FALSE]</span><span class="style2">This is a property of all objects. It determines if the object is displayed or not.</span><span class="style6">WantsFocus = [TRUE, FALSE]</span><span class="style2">This is a property of lists and QuickTime objects. If it is true, then all keystrokes and edit menu commands will be intercepted by the object when it has the focus ‚Äî when it has been clicked on or tabbed to. Tab will move the focus to the next object that wants it. Lists will scroll to and select the first item in the list which matches the key typed. Arrow keys may also be used to manipulate the selection. Note: This property is the same as the keyScroll property.</span><span class="style6">WhiteColor = [RED, GREEN, BLUE]|[x]</span><span class="style2">This is a property of all objects. On Macs capable of displaying color, it defines the color that should be used in place of white when drawing the object. The color is specified as a RGB value. Be careful when choosing colors for windows that may be used on black and white or less colorful monitors. The colors will map to the nearest color available, or to white if black and white. Advanced users: This property may also be set with an index into the system CLUT id 256. The external function AnswerColor may be used to prompt a user for a color with the standard color picker. </span><span class="style6">Width = [x]</span><span class="style2">This is a property of all objects. It specifies the width of the object.</span><span class="style6">*Wordwrap = [TRUE, FALSE]</span><span class="style2">This is a property of text objects. It specifies whether or not the text should wrap when it reaches the right-hand margin of the object.</span></text>
</content>
<name> Property List</name>
<script></script>
</card>
card_6773.xml
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE card PUBLIC "-//Apple, Inc.//DTD card V 2.0//EN" "" >
<script>on mouseUpget textStyle of clickChunk()if it contains "group" thenif textfont of clickChunk() is "Monaco" thendo clickText()else if it contains italic thenfind clickText() in bg fld "Topic"if the result is not empty then put the resultend ifend ifend mouseUp</script>
</part>
<part>
<id>2</id>
<type>button</type>
<visible> <true /> </visible>
<reserved5> 0 </reserved5>
<reserved4> 0 </reserved4>
<reserved3> 0 </reserved3>
<reserved2> 0 </reserved2>
<reserved1> 0 </reserved1>
<enabled> <true /> </enabled>
<rect>
<left>158</left>
<top>56</top>
<right>170</right>
<bottom>220</bottom>
</rect>
<style>opaque</style>
<showName> <false /> </showName>
<highlight> <false /> </highlight>
<autoHighlight> <false /> </autoHighlight>
<sharedHighlight> <true /> </sharedHighlight>
<family>0</family>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>center</textAlign>
<font>Chicago</font>
<textSize>12</textSize>
<textStyle>plain</textStyle>
<name></name>
<script></script>
</part>
<content>
<layer>background</layer>
<id>103</id>
<text>Font, Style, Color</text>
</content>
<content>
<layer>card</layer>
<id>1</id>
<text><span class="style6">ont</span><span class="style2">This menu allows you to quickly change the textfont property of items selected in the window being edited. When the arrow cursor is active, this menu will allow you to set the font of the selected text, including popups and buttons.</span><span class="style6">Style Menu</span><span class="style2">If the selection cursor is active, this menu allows you to quickly change the textsize and textstyle property of items selected in the window being edited. In play mode, this affects the type in text objects.</span><span class="style6">Color Menu</span><span class="style2">This menu allows you to quickly change the whitecolor and blackcolor properties of the items selected in the window being edited. BlackColor is the color that will be used to draw the parts of an object normally drawn in black, such as the border and text of buttons; whiteColor is the color used to draw the white portion of objects, such as the white space inside a button. Selections from this menu normally affect the blackcolor of the selected items. To change the whitecolor, hold down the option key while making a selection.</span></text>
</content>
<name> Font,Style,Color</name>
<script></script>
</card>
card_8452.xml
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE card PUBLIC "-//Apple, Inc.//DTD card V 2.0//EN" "" >
<script>on mouseUpget textStyle of clickChunk()if it contains "group" thenif textfont of clickChunk() is "Monaco" thendo clickText()else if it contains italic thenfind clickText() in bg fld "Topic"if the result is not empty then put the resultend ifend ifend mouseUp</script>
</part>
<part>
<id>2</id>
<type>button</type>
<visible> <true /> </visible>
<reserved5> 0 </reserved5>
<reserved4> 0 </reserved4>
<reserved3> 0 </reserved3>
<reserved2> 0 </reserved2>
<reserved1> 0 </reserved1>
<enabled> <true /> </enabled>
<rect>
<left>157</left>
<top>56</top>
<right>169</right>
<bottom>220</bottom>
</rect>
<style>opaque</style>
<showName> <false /> </showName>
<highlight> <false /> </highlight>
<autoHighlight> <false /> </autoHighlight>
<sharedHighlight> <true /> </sharedHighlight>
<family>0</family>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>center</textAlign>
<font>Chicago</font>
<textSize>12</textSize>
<textStyle>plain</textStyle>
<name></name>
<script></script>
</part>
<content>
<layer>card</layer>
<id>1</id>
<text><span class="style6">how Info/Hide Info</span><span class="style2">Alternately shows and hides the information about the properties for the object selected in the property picker.</span><span class="style6">Bring Closer</span><span class="style2">Moves the selected items in front of the other objects in the window.</span><span class="style6">Send Farther</span><span class="style2">Moves the selected items behind the other objects in the window.</span><span class="style6">Grid</span><span class="style2">Either turns on or turns off the grid that covers the window being edited. When on, objects will “snap to” the grid position, making aligning objects a breeze.</span><span class="style6">Align Lefts</span><span class="style2">Align the left edges of the selected objects.</span><span class="style6">Align Tops</span><span class="style2">Align the top edges of the selected objects.</span><span class="style6">Align Rights</span><span class="style2">Align the right edges of the selected objects.</span><span class="style6">Align Bottoms</span><span class="style2">Align the bottom edges of the selected objects.</span><span class="style6">Duplicate</span><span class="style2">Duplicates the currently selected items.</span></text>
</content>
<content>
<layer>background</layer>
<id>103</id>
<text>Objects</text>
</content>
<name> Objects</name>
<script></script>
</card>
card_3065.xml
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE card PUBLIC "-//Apple, Inc.//DTD card V 2.0//EN" "" >
<script>on mouseUpget textStyle of clickChunk()if it contains "group" thenif textfont of clickChunk() is "Monaco" thendo clickText()else if it contains italic thenfind clickText() in bg fld "Topic"if the result is not empty then put the resultend ifend ifend mouseUp</script>
</part>
<part>
<id>2</id>
<type>button</type>
<visible> <true /> </visible>
<reserved5> 0 </reserved5>
<reserved4> 0 </reserved4>
<reserved3> 0 </reserved3>
<reserved2> 0 </reserved2>
<reserved1> 0 </reserved1>
<enabled> <true /> </enabled>
<rect>
<left>94</left>
<top>56</top>
<right>106</right>
<bottom>220</bottom>
</rect>
<style>opaque</style>
<showName> <false /> </showName>
<highlight> <false /> </highlight>
<autoHighlight> <false /> </autoHighlight>
<sharedHighlight> <true /> </sharedHighlight>
<family>0</family>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>center</textAlign>
<font>Chicago</font>
<textSize>12</textSize>
<textStyle>plain</textStyle>
<name></name>
<script></script>
</part>
<content>
<layer>background</layer>
<id>103</id>
<text>Tools</text>
</content>
<content>
<layer>card</layer>
<id>1</id>
<text><span class="style2">ike HyperCard, the Tools menu is a palette of useful things, and can be torn off the menubar. There are two types of tools:</span><span class="style6">Cursor Tools</span><span class="style2">The top portion of the tool palette offers two types of interaction with the window being edited. The arrow cursor causes the window to behave “normally” — just as it will when you invoke it directly with WindowScript. The selection cursor allows you to select items in the window and to drag them around. </span><span class="style6">Object Tools</span><span class="style2">The bottom portion of the palette contains item tools. To create a new object in the window, select the appropriate tool and drag out the desired location for the object in the window. When you release the mouse button, it will be created and placed. Once an object has been created, the Selection cursor is automatically chosen. For more information, see the tools window chapter.</span></text>
</content>
<name> Tools</name>
<script></script>
</card>
card_2310.xml
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE card PUBLIC "-//Apple, Inc.//DTD card V 2.0//EN" "" >
<script>on mouseUpget textStyle of clickChunk()if it contains "group" thenif textfont of clickChunk() is "Monaco" thendo clickText()else if it contains italic thenfind clickText() in bg fld "Topic"if the result is not empty then put the resultend ifend ifend mouseUp</script>
</part>
<part>
<id>2</id>
<type>button</type>
<visible> <true /> </visible>
<reserved5> 0 </reserved5>
<reserved4> 0 </reserved4>
<reserved3> 0 </reserved3>
<reserved2> 0 </reserved2>
<reserved1> 0 </reserved1>
<enabled> <true /> </enabled>
<rect>
<left>157</left>
<top>56</top>
<right>169</right>
<bottom>220</bottom>
</rect>
<style>opaque</style>
<showName> <false /> </showName>
<highlight> <false /> </highlight>
<autoHighlight> <false /> </autoHighlight>
<sharedHighlight> <true /> </sharedHighlight>
<family>0</family>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>center</textAlign>
<font>Chicago</font>
<textSize>12</textSize>
<textStyle>plain</textStyle>
<name></name>
<script></script>
</part>
<content>
<layer>background</layer>
<id>103</id>
<text>Go</text>
</content>
<content>
<layer>card</layer>
<id>1</id>
<text><span class="style2">ll open WindowScript windows are listed. Select one to bring it to the front.</span><span class="style6">Message</span><span class="style2">Alternately shows and hides the WindowScript big message window. This is similar to the regular message box, but has a zoom box. If you zoom it, it will enlarge to show the last commands executed in a scrolling list.</span><span class="style6">Next Window</span><span class="style2">Sends the frontmost window to the back and activates the next window.</span></text>
</content>
<name> Go</name>
<script></script>
</card>
card_3587.xml
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE card PUBLIC "-//Apple, Inc.//DTD card V 2.0//EN" "" >
<script>on mouseUpget textStyle of clickChunk()if it contains "group" thenif textfont of clickChunk() is "Monaco" thendo clickText()else if it contains italic thenfind clickText() in bg fld "Topic"if the result is not empty then put the resultend ifend ifend mouseUp</script>
</part>
<part>
<id>2</id>
<type>button</type>
<visible> <true /> </visible>
<reserved5> 0 </reserved5>
<reserved4> 0 </reserved4>
<reserved3> 0 </reserved3>
<reserved2> 0 </reserved2>
<reserved1> 0 </reserved1>
<enabled> <true /> </enabled>
<rect>
<left>135</left>
<top>56</top>
<right>147</right>
<bottom>220</bottom>
</rect>
<style>opaque</style>
<showName> <false /> </showName>
<highlight> <false /> </highlight>
<autoHighlight> <false /> </autoHighlight>
<sharedHighlight> <true /> </sharedHighlight>
<family>0</family>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>center</textAlign>
<font>Chicago</font>
<textSize>12</textSize>
<textStyle>plain</textStyle>
<name></name>
<script></script>
</part>
<content>
<layer>background</layer>
<id>103</id>
<text>Edit</text>
</content>
<content>
<layer>card</layer>
<id>1</id>
<text><span class="style6">ndo</span><span class="style2">Undo is not available for actions taken in WindowScript. It is provided for consistency within the Macintosh Interface Guidelines.</span><span class="style6">Cut</span><span class="style2">If the selection cursor is active, a textual description of the currently selected items will be placed onto the clipboard and the items will be removed from the window. If the arrow cursor is active, it will behave as appropriate for the context.</span><span class="style6">Copy</span><span class="style2">If the selection cursor is active, a textual description of the currently selected items will be placed onto the clipboard. The items will not be removed from the window. If the arrow cursor is active, it will behave as appropriate for the context.</span><span class="style6">Paste</span><span class="style2">If the selection cursor is active, items on the clipboard will be placed into the window. If a picture is on the clipboard, it will be added to the stack as a resource and to the window as an object. Likewise, icons, color icons and Finder icons will all be added to both the stack and the window if they are on the clipboard. If the arrow cursor is active, it will behave as appropriate for the context.</span><span class="style6">Select All</span><span class="style2">If the selection cursor is active, all the items in the window are selected. If the arrow cursor is active, it will behave as appropriate for the context.</span></text>
</content>
<name> Edit</name>
<script></script>
</card>
card_2737.xml
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE card PUBLIC "-//Apple, Inc.//DTD card V 2.0//EN" "" >
<script>on mouseUpget textStyle of clickChunk()if it contains "group" thenif textfont of clickChunk() is "Monaco" thendo clickText()else if it contains italic thenfind clickText() in bg fld "Topic"if the result is not empty then put the resultend ifend ifend mouseUp</script>
</part>
<part>
<id>2</id>
<type>button</type>
<visible> <true /> </visible>
<reserved5> 0 </reserved5>
<reserved4> 0 </reserved4>
<reserved3> 0 </reserved3>
<reserved2> 0 </reserved2>
<reserved1> 0 </reserved1>
<enabled> <true /> </enabled>
<rect>
<left>163</left>
<top>56</top>
<right>175</right>
<bottom>220</bottom>
</rect>
<style>opaque</style>
<showName> <false /> </showName>
<highlight> <false /> </highlight>
<autoHighlight> <false /> </autoHighlight>
<sharedHighlight> <true /> </sharedHighlight>
<family>0</family>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>center</textAlign>
<font>Chicago</font>
<textSize>12</textSize>
<textStyle>plain</textStyle>
<name>Mask</name>
<script></script>
</part>
<content>
<layer>background</layer>
<id>103</id>
<text>File</text>
</content>
<content>
<layer>card</layer>
<id>1</id>
<text><span class="style34">ew Window</span><span class="style22">Creates a new, empty window. Shows the tools palette and the property picker windoid so that items may be added and their properties examined. The exact size, style and contents of the initially displayed window may be altered with the Save Default menu item described below.</span><span class="style34">Open Window…</span><span class="style22">Presents the windows dialog. From this dialog, you pick the window to edit. You can also create a new window, or delete an existing window. If you check the “Open as text” checkbox, WindowScript will display the window in text format; that is, it will display the text of the LENS resource that describes the window. This can be useful for creating or modifying many objects at once by simply copying and pasting descriptions.</span><span class="style34">Close Window</span><span class="style22">Closes the frontmost window. If changes have not been saved, you are asked if you wish to do so.</span><span class="style34">Import Resource</span><span class="style22">Allows you to import any resources from any other file. For instance, if you have created dialogs for other stacks or programs using ResEdit, you may bring them into your stack. Dialogs (resource type DLOGs) are converted into LENS with the same name as the resource. Dependent resources, such as pictures and icons (PICTs and ICONs), are not automatically imported. Make sure you import them, too. </span><span class="style34">Save Window</span><span class="style22">Saves all changes to the frontmost window. </span><span class="style34">Save Window Into…</span><span class="style22">Allows a copy of the window to be saved into a different stack.</span><span class="style34">Save Default</span><span class="style22">Saves the current window as the default. The default is used whenever a new window is created. It has effect only on the stack you are currently in — unless you do this in the WindowScript stack itself. This is useful if you will be creating a number of dialogs or windows that will share common elements such as lines, boxes, or pictures or a standard script for the window itself, so that all windows in a set behave in a standard fashion.</span><span class="style34">Delete Window</span><span class="style22">Deletes a window from the stack.</span><span class="style34">Page Setup…</span><span class="style22">The standard Page Setup dialog. Controls how windows will be printed by subsequent “Print…” commands.</span><span class="style34">Print…</span><span class="style22">Prints the frontmost window. It may be either the actual window or a textual description of that window (when it was opened with Open As Text).</span><span class="style34">Quit HyperCard</span><span class="style22">As you might guess, this will close WindowScript and quit HyperCard.</span></text>
</content>
<name> File</name>
<script>on hopieHitend hopieHit</script>
</card>
card_11586.xml
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE card PUBLIC "-//Apple, Inc.//DTD card V 2.0//EN" "" >
<script>on mouseUpget textStyle of clickChunk()if it contains "group" thenif textfont of clickChunk() is "Monaco" thendo clickText()else if it contains italic thenfind clickText() in bg fld "Topic"if the result is not empty then put the resultend ifend ifend mouseUp</script>
</part>
<part>
<id>3</id>
<type>button</type>
<visible> <true /> </visible>
<reserved5> 0 </reserved5>
<reserved4> 0 </reserved4>
<reserved3> 0 </reserved3>
<reserved2> 0 </reserved2>
<reserved1> 0 </reserved1>
<enabled> <true /> </enabled>
<rect>
<left>10</left>
<top>139</top>
<right>358</right>
<bottom>151</bottom>
</rect>
<style>opaque</style>
<showName> <false /> </showName>
<highlight> <false /> </highlight>
<autoHighlight> <false /> </autoHighlight>
<sharedHighlight> <true /> </sharedHighlight>
<family>0</family>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>center</textAlign>
<font>Chicago</font>
<textSize>12</textSize>
<textStyle>plain</textStyle>
<name></name>
<script></script>
</part>
<content>
<layer>background</layer>
<id>103</id>
<text>Big Message</text>
</content>
<content>
<layer>card</layer>
<id>1</id>
<text>WindowScript replaces HyperCard’s message box with its own customized message box. The new message box works the same way, but there are a few differences:• The Zoom Box (in the upper right corner of the title bar) expands the window, showing a scrolling area with the last commands you have entered. You can re-execute a line by selecting it and hitting Enter. • Big Message gives only one error message when it can’t understand you: “Huh?” HyperCard’s message box is still available from HyperCard’s menus, and when you put a value, it is put into HyperCard’s message box, not into Big Message. It’s easy to confuse the two, but there’s a simple way to tell them apart: the place where you type in Big Message has a dashed underline, as opposed to HyperCard’s gray underline.The benefit of Big Message is that it provides a simple way to climb back into WindowScript when the tool palette and property picker are gone — just click on Big Message, and WindowScript’s menus are back.</text>
</content>
<name> Big Message</name>
<script></script>
</card>
card_7837.xml
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE card PUBLIC "-//Apple, Inc.//DTD card V 2.0//EN" "" >
<script>on mouseUpget textStyle of clickChunk()if it contains "group" thenif textfont of clickChunk() is "Monaco" thendo clickText()else if it contains italic thenfind clickText() in bg fld "Topic"if the result is not empty then put the resultend ifend ifend mouseUp</script>
</part>
<part>
<id>2</id>
<type>button</type>
<visible> <true /> </visible>
<reserved5> 0 </reserved5>
<reserved4> 0 </reserved4>
<reserved3> 0 </reserved3>
<reserved2> 0 </reserved2>
<reserved1> 0 </reserved1>
<enabled> <true /> </enabled>
<rect>
<left>125</left>
<top>56</top>
<right>137</right>
<bottom>220</bottom>
</rect>
<style>opaque</style>
<showName> <false /> </showName>
<highlight> <false /> </highlight>
<autoHighlight> <false /> </autoHighlight>
<sharedHighlight> <true /> </sharedHighlight>
<family>0</family>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>center</textAlign>
<font>Chicago</font>
<textSize>12</textSize>
<textStyle>plain</textStyle>
<name></name>
<script></script>
</part>
<content>
<layer>background</layer>
<id>103</id>
<text>Property Picker</text>
</content>
<content>
<layer>card</layer>
<id>1</id>
<text>This is the property picker. It is currently in its collapsed state. To see the rest of it, click on the “Show Properties” button at the bottom. It will zoom out to display the properties of the selected object.Along the left edge of the property picker is the object list. Every object in the window is listed. Clicking on an object in the list displays its properties in the right-hand side of the window.The right-hand side — the side that shows the properties — is divided into two parts. The top half shows properties that every object shares: name, location, font, etc. The lower half contains properties specific to each object. The lower half will change for different objects; the upper half will always display the same properties.When you hit Return or Enter, the property picker shrinks back to its smaller size. This way, if you have a screen that’s strapped for pixels, the property picker won’t be in your way. If you want to move to another field, hit tab instead.Note: Objects may be re-ordered in the list by dragging. This affects their stacking order, tabbing order and radio button grouping.There are four Siamese buttons along the middle of the window: Script..., Params..., Result..., and Menus.... These odd-looking buttons work two ways. If you click on the latch (on the left), the lower portion of the property picker will become an edit field, so you can edit the contents of that property directly. If you click on the button, a separate editing window will open, allowing you to edit the property in that window. See the Scripting chapter for more details.</text>
</content>
<name> Property Picker</name>
<script></script>
</card>
card_10623.xml
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE card PUBLIC "-//Apple, Inc.//DTD card V 2.0//EN" "" >
<script>on mouseUpget textStyle of clickChunk()if it contains "group" thenif textfont of clickChunk() is "Monaco" thendo clickText()else if it contains italic thenfind clickText() in bg fld "Topic"if the result is not empty then put the resultend ifend ifend mouseUp</script>
</part>
<part>
<id>3</id>
<type>button</type>
<visible> <true /> </visible>
<reserved5> 0 </reserved5>
<reserved4> 0 </reserved4>
<reserved3> 0 </reserved3>
<reserved2> 0 </reserved2>
<reserved1> 0 </reserved1>
<enabled> <true /> </enabled>
<rect>
<left>95</left>
<top>56</top>
<right>107</right>
<bottom>220</bottom>
</rect>
<style>opaque</style>
<showName> <false /> </showName>
<highlight> <false /> </highlight>
<autoHighlight> <false /> </autoHighlight>
<sharedHighlight> <true /> </sharedHighlight>
<family>0</family>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>center</textAlign>
<font>Chicago</font>
<textSize>12</textSize>
<textStyle>plain</textStyle>
<name></name>
<script></script>
</part>
<content>
<layer>background</layer>
<id>103</id>
<text>Tools Palette</text>
</content>
<content>
<layer>card</layer>
<id>2</id>
<text><span class="style2">ike the HyperCard tool palette, WindowScript’s tool palette is divided into two parts. The tools at the top are editing cursors; the tools at the bottom are objects. This palette also appears under the tool menu. You can select a tool from the menu, or you can tear the menu off and place it anywhere on the screen, just like the HyperCard tool palette. There are fifteen object tools in the palette: </span><span class="style6">The Button tool.</span><span class="style2"> This is used to create standard Macintosh buttons. If a button’s defaultItem property is true, then a Return or Enter keypress will be the same as clicking the button. If a button’s cancelItem property is true, then pressing command-period will be the same as clicking it. If a button’s autoClose property is true, then the button will close the window it belongs to. It executes its script upon mouseUp.</span><span class="style6">The Radio Button tool.</span><span class="style2"> This is used to create radio buttons. All radio buttons in sequential order in the object list will be grouped, that is, selecting one will deselect the others. The hilite property tells you if the button is on or off. It executes its script upon mouseUp.</span><span class="style6">The Checkbox tool.</span><span class="style2"> This is used to create checkboxes. The check is controlled by the hilite property. It executes its script upon mouseUp.</span><span class="style6">The Label tool.</span><span class="style2"> This is used to create short labels. For text that requires user interaction, use one of the Text tools below. The label displayed is the same as the name of this object. It executes its script upon mouseUp.</span><span class="style6">The Static Text tool.</span><span class="style2"> This is text that the user cannot change. It executes its script upon mouseUp.</span><span class="style6">The Editable Text tool.</span><span class="style2"> This is text that the user enters from the keyboard. Both text tools create the same object — a text object — but their lockText property differs. The text displayed is contained in the text property. It executes its script upon closeField.</span><span class="style6">The Icon tool.</span><span class="style2"> For displaying icons and Finder icons. You choose the icon to be displayed with the name property; match the name of the object to the name of the icon resource you want to display. If you leave the name of an icon object blank, it will display nothing. Icons can behave like buttons; the logic property controls how they behave. Icons execute their scripts upon mouseUp.</span><span class="style6">The Picture tool.</span><span class="style2"> For displaying pictures in the window. You choose the picture to be displayed with the name property; match the name of the object to the name of the picture resource you want to display. If you leave the name of a picture object blank, it will display nothing — this can be useful for transparent buttons. Pictures can also be divided into a grid of buttons. The selection logic of these buttons is chosen with the logic property. Pictures execute their scripts upon mouseUp.</span><span class="style6">The QuickTime tool.</span><span class="style2"> For playing QuickTime movies. The movie file to be played is set in the file property. If the scrolling property is true, then the movie will use the standard QuickTime controller. If the wantFocus property is true, then the movie will accept Cut, Copy and Paste commands from the Edit menu. You can play the movie by clicking on the play button in the controller (if it’s available, that is, if the scrolling property is true) or by sending a play command to the object. It executes its script upon mouseUp.</span><span class="style6">The List tool.</span><span class="style2"> For displaying all kinds of lists. The list items are contained in the text property, each separated by a return. If the keyScroll property is true, then pressing a key will select the first item that starts with that key. Arrow keys can be used to navigate the list. There are many different list display styles available — see the Notes Chapter. Lists execute their scripts upon mouseUp.</span><span class="style6">The Pop-up Menu tool.</span><span class="style2"> This pops up a menu. The text property contains the items to be popped up, each separated by a return. The titleItem property determines which object will be hilited as the menu title (usually this is a label). It executes its script upon mouseUp.</span><span class="style6">The Control tool.</span><span class="style2"> This is used to put Macintosh controls (other than buttons) in the window. Examples of controls include gauges, thermometers, and scrollbars. Specify the control with the style property. Advanced users can write their own controls in Pascal or C. It executes its script upon mouseDown. (Note: Lists, text, and pictures can have their own scrollbars. You don’t need to use a control object for these.)</span><span class="style6">The Box tool.</span><span class="style2"> For drawing boxes. This is useful to set off a group of radio buttons.</span><span class="style6">The RoundRect tool.</span><span class="style2"></span><span class="style6">The Line tool.</span><span class="style2">To create a new object in the window, select the appropriate tool and drag out the desired location for the object in the window. When you release the mouse button, it will be created and placed. Most objects will snap to a “natural” size — for instance, a button will be resized to the standard button height; a picture will snap to its full size; an icon will snap to a 32 by 32 pixel rectangle. If you want the object to be a different size, uncheck the “Autosize” property in the property picker.</span><span class="style6">The Arrow tool.</span><span class="style2"> This tool is used to “Play” a window, that is, to test a window. In the play mode, the window acts the same as it will for a user (except that, technically, it will be in the document layer —a consideration you’ll probably never have to worry about). </span><span class="style6">The Selection tool.</span><span class="style2"> This tool is used to edit windows — whenever you wish to move, resize, or delete an object. When you double-click an object with it, the property picker opens to display that object’s properties. (When in select mode, objects may be dragged and resized with the mouse.) Modifier keys may be used to do the following:</span><span class="style28">Shift</span><span class="style2"> constrains movement just like HyperCard.</span><span class="style28">Control</span><span class="style2"> temporarily reverses the snap-to-grid state of the window as defined by the Grid menu item. </span><span class="style28">Option</span><span class="style2"> clones the selected objects just like HyperCard. If not over an object, option allows you to drag or resize the window as a whole.When one or more objects have been selected, they may be nudged from the keyboard. Once again, modifier keys may be used:</span><span class="style28">Control</span><span class="style2"> temporarily reverses the snap-to-grid state of the window as defined by the Grid menu item. </span><span class="style28">Command</span><span class="style2"> resizes the bottom right of the objects rather than moving the whole object.</span><span class="style28">Delete</span><span class="style2"> deletes the selected objects.If you drag an object but change your mind before releasing the mouse button, simply drag the object to the menu bar. It will not be moved.</span></text>
</content>
<name> Tools Palette</name>
<script></script>
</card>
card_11346.xml
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE card PUBLIC "-//Apple, Inc.//DTD card V 2.0//EN" "" >
<script>on mouseUpget textStyle of clickChunk()if it contains "group" thenif textfont of clickChunk() is "Monaco" thendo clickText()else if it contains italic thenfind clickText() in bg fld "Topic"if the result is not empty then put the resultend ifend ifend mouseUp</script>
</part>
<content>
<layer>background</layer>
<id>103</id>
<text>30 Second Expert</text>
</content>
<content>
<layer>card</layer>
<id>1</id>
<text><span class="style2">indowScript is an external function (XFCN) for HyperCard that creates windows, dialogs and floating palettes. Windows contain objects, such as push buttons, popup menus and pictures. WindowScript comes with fifteen standard objects; advanced users can create additional custom objects. The window and all of its objects have properties which describe and control their behavior. A property has a name and a value. For example, the visible property has a value of true or false and governs whether an object is visible. Many properties, such as visible, are common to all objects. Some are specific to individual types of objects (e.g., a checkbox object has a hilite property which defines whether or not it is checked).Each object in a window may have a script associated with it. These scripts are automatically invoked when appropriate. While in these scripts, or any time a window is displayed, any property of any object may be determined using the wsGet XFCN and changed with the wsSet XCMD. Certain objects can also be sent predefined commands with the wsSend XCMD (e.g., send play to a QuickTime object). </span><span class="style6">Making a Window</span><span class="style2">When WindowScript has been installed, a “Window…” item is added to HyperCard’s Edit menu. Selecting this menu item brings up a dialog from which you may select an existing window or create a new one. Creating windows is done in the stack in which they’ll be used. Once a window has been opened for editing, a modified tool palette allows objects to be added directly to the window and a property picker windoid allows quick access to most of the properties of each object. After objects have been added to a window, arranged as desired, and had their properties set, the window is saved into the stack for later use.</span><span class="style6">Using a Window</span><span class="style2">To use a window, the WindowScript XFCN is called with the name of the window to be displayed. (Alternately, a full textual description of a window may be given.) For example, this command would open a window previously saved under the name “DateDialog”:</span><span class="style9"> get WindowScript("DateDialog")</span><span class="style2">and afterwards, the variable “it” would contain the item number of the object used to close the dialog along with some other information, or empty if the user clicked cancel. (It is possible to configure WindowScript to return additional information; this will be discussed later when we cover the Params property.)</span><span class="style6">How Windows Are Stored</span><span class="style2">Windows are stored in a stack’s resource fork as textual descriptions of type LENS. The LENS resources describe the windows, their objects and their properties. It’s basically a complete inventory of all the objects and properties that make up the window. Each window you create will have exactly one LENS resource and, depending on what the window does, may require that other resources be in the stack as well. (A LENS resource is just a template from which a window is created; it isn’t used while the window is open, so you can open many windows from one LENS.)</span><span class="style6">Changing Properties</span><span class="style2">You should already be familar with properties of HyperCard objects such as the name of a button or the lockText of a field. WindowScript properties perform similar functions and are used in much the same way. Windows and objects are manipulated through their properties. Properties are the individual features of objects that set them apart: location, name, font, color and so forth. Properties are accessed through HyperTalk statements. For example, to learn if a window has a title bar, you could type:</span><span class="style9"> put HasTitleBar of window "Untitled"</span><span class="style2">into the message box, and HyperCard would return either true or false as appropriate. All the properties of a window are accessible in this manner, except for modal dialogs, which cannot be accessed in this fashion. (See below for details.)A slightly different syntax is required to get at an object’s properties. To refer to a property of an individual object, the property name is preceded by the object’s name and an underscore. Say that we have an editable text item named Bob. To get the text that has been typed into Bob, you could say:</span><span class="style9"> get Bob_Text of window "Untitled"</span><span class="style2">and HyperCard would put the contents of the text item Bob into the container it. Likewise:</span><span class="style9"> set Bob_Text of window "Untitled" to "Nothing!"</span><span class="style2">would set the text for Bob to “Nothing!” </span><span class="style6">Changing Properties Using Item Numbers</span><span class="style2">While WindowScript will allow two or more word names for objects, HyperCard demands that object names be just one word. Also, the above won’t work if you want to leave an object unnamed, or if you used the same name for several objects.Instead of using the object’s name, you can use an “i” and the object number and “_” as a reference. For example: </span><span class="style9"> get i3_Disabled of window "Example"</span><span class="style2">would get True or False, depending on whether the item was disabled or not. If the name of your property is not a single word, you must refer to the object by number when using get or set. </span><span class="style6">Changing Properties Using wsSet and wsGet</span><span class="style2">Rather than trying to remember all the special cases, you can use WindowScript’s built-in externals, wsSet and wsGet, to do the same thing as HyperCard’s set and get. The nice thing about wsSet and wsGet is that they work all the time, for all window types, and for all objects, regardless of name.You can also use expressions in the property name using these externals. Modal windows — those windows whose style is Dialog — can only be manipulated using wsSet and wsGet. You use them like this: </span><span class="style33"> </span><span class="style9">get wsGet("Example","OK","Disabled") wsSet "Example",1,"Disabled",TRUE </span><span class="style2"> which are the same as:</span><span class="style9"> get OK_Disabled of window "Example" set i1_Disabled of window "Example" to true</span><span class="style2">Note: These externals, however, are slower than HyperCard’s Get and Set commands. In general, you should use them when it can’ t be avoided: when your object names have more than one word, or when you are manipulating the objects of a modal window.</span></text>
</content>
<name> 30 Second Expert</name>
<script></script>
</card>
card_10756.xml
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE card PUBLIC "-//Apple, Inc.//DTD card V 2.0//EN" "" >
<script>on mouseDownrepeatif the mouseH < left of me thenselect before text of meelse if the mouseH > right of me thenselect before text of mesend mouseDown to cd fld id 7exit mouseDownelseput (the mouseV - top of me) div 11 + 1 into theLineget line theLine of meif char 1 of it =" "then select line theLine of meelse if it = ""then select before text of meelse select line theLine+1 of meend ifif the mouse is not down then exit repeatend repeatget the selectionif it is not empty thenvisual effect iris open fastgo cd itif the result is not emptythen StopAlert "This section is not available in the Working Model."end ifend mouseDown</script>
</part>
<part>
<id>3</id>
<type>field</type>
<visible> <true /> </visible>
<dontWrap> <false /> </dontWrap>
<dontSearch> <false /> </dontSearch>
<sharedText> <false /> </sharedText>
<fixedLineHeight> <true /> </fixedLineHeight>
<autoTab> <false /> </autoTab>
<lockText> <true /> </lockText>
<rect>
<left>246</left>
<top>59</top>
<right>371</right>
<bottom>206</bottom>
</rect>
<style>transparent</style>
<autoSelect> <false /> </autoSelect>
<showLines> <false /> </showLines>
<wideMargins> <false /> </wideMargins>
<multipleLines> <false /> </multipleLines>
<reservedFamily> 0 </reservedFamily>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>left</textAlign>
<font>Geneva</font>
<textSize>9</textSize>
<textStyle>plain</textStyle>
<textHeight>11</textHeight>
<name></name>
<script>on mouseDownrepeatif the mouseH < left of me thenselect before text of mesend mouseDown to cd fld id 7exit mouseDownelse if the mouseH > right of me thenselect before text of meelseput (the mouseV - top of me) div 11 + 1 into theLineget line theLine of meif char 1 of it =" "then select line theLine of meelse if it = ""then select before text of meelse select line theLine+1 of meend ifif the mouse is not down then exit repeatend repeatget the selectionif it is not empty thenvisual effect iris open fastgo cd itif the result is not emptythen StopAlert "This section is not available in the Working Model."end ifend mouseDown</script>
</part>
<part>
<id>6</id>
<type>button</type>
<visible> <true /> </visible>
<reserved5> 0 </reserved5>
<reserved4> 0 </reserved4>
<reserved3> 0 </reserved3>
<reserved2> 0 </reserved2>
<reserved1> 0 </reserved1>
<enabled> <true /> </enabled>
<rect>
<left>9</left>
<top>10</top>
<right>39</right>
<bottom>43</bottom>
</rect>
<style>rectangle</style>
<showName> <false /> </showName>
<highlight> <false /> </highlight>
<autoHighlight> <true /> </autoHighlight>
<sharedHighlight> <true /> </sharedHighlight>
<family>0</family>
<titleWidth>0</titleWidth>
<icon>13744</icon>
<textAlign>center</textAlign>
<font>Chicago</font>
<textSize>12</textSize>
<textStyle>plain</textStyle>
<name></name>
<script>on mouseUpgo homeend mouseUp</script>
</part>
<part>
<id>7</id>
<type>field</type>
<visible> <true /> </visible>
<dontWrap> <false /> </dontWrap>
<dontSearch> <false /> </dontSearch>
<sharedText> <false /> </sharedText>
<fixedLineHeight> <true /> </fixedLineHeight>
<autoTab> <false /> </autoTab>
<lockText> <true /> </lockText>
<rect>
<left>132</left>
<top>59</top>
<right>247</right>
<bottom>206</bottom>
</rect>
<style>transparent</style>
<autoSelect> <false /> </autoSelect>
<showLines> <false /> </showLines>
<wideMargins> <false /> </wideMargins>
<multipleLines> <false /> </multipleLines>
<reservedFamily> 0 </reservedFamily>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>left</textAlign>
<font>Geneva</font>
<textSize>9</textSize>
<textStyle>plain</textStyle>
<textHeight>11</textHeight>
<name></name>
<script>on mouseDownrepeatif the mouseH < left of me thenselect before text of mesend mouseDown to cd fld id 2exit mouseDownelse if the mouseH > right of me thenselect before text of mesend mouseDown to cd fld id 3exit mouseDownelseput (the mouseV - top of me) div 11 + 1 into theLineget line theLine of meif char 1 of it =" "then select line theLine of meelse if it = ""then select before text of meelse select line theLine+1 of meend ifif the mouse is not down then exit repeatend repeatget the selectionif it is not empty thenvisual effect iris open fastgo cd itif the result is not emptythen StopAlert "This section is not available in the Working Model."end ifend mouseDown</script>
<script>on mouseUpget textStyle of clickChunk()if it contains "group" thenif textfont of clickChunk() is "Monaco" thendo clickText()else if it contains italic thenfind clickText() in bg fld "Topic"if the result is not empty then put the resultend ifend ifend mouseUp</script>
</part>
<part>
<id>2</id>
<type>button</type>
<visible> <true /> </visible>
<reserved5> 0 </reserved5>
<reserved4> 0 </reserved4>
<reserved3> 0 </reserved3>
<reserved2> 0 </reserved2>
<reserved1> 0 </reserved1>
<enabled> <true /> </enabled>
<rect>
<left>9</left>
<top>10</top>
<right>39</right>
<bottom>43</bottom>
</rect>
<style>rectangle</style>
<showName> <false /> </showName>
<highlight> <false /> </highlight>
<autoHighlight> <true /> </autoHighlight>
<sharedHighlight> <true /> </sharedHighlight>
<family>0</family>
<titleWidth>0</titleWidth>
<icon>13744</icon>
<textAlign>center</textAlign>
<font>Chicago</font>
<textSize>12</textSize>
<textStyle>plain</textStyle>
<name></name>
<script>on mouseUpgo homeend mouseUp</script>
</part>
<part>
<id>5</id>
<type>field</type>
<visible> <false /> </visible>
<dontWrap> <false /> </dontWrap>
<dontSearch> <false /> </dontSearch>
<sharedText> <false /> </sharedText>
<fixedLineHeight> <false /> </fixedLineHeight>
<autoTab> <false /> </autoTab>
<lockText> <true /> </lockText>
<rect>
<left>166</left>
<top>72</top>
<right>367</right>
<bottom>90</bottom>
</rect>
<style>opaque</style>
<autoSelect> <false /> </autoSelect>
<showLines> <false /> </showLines>
<wideMargins> <false /> </wideMargins>
<multipleLines> <false /> </multipleLines>
<reservedFamily> 0 </reservedFamily>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>left</textAlign>
<font>Geneva</font>
<textSize>10</textSize>
<textStyle>plain</textStyle>
<textHeight>13</textHeight>
<name>Is2</name>
<script>on mouseUpget textStyle of clickChunk()if it contains "group" thenif textfont of clickChunk() is "Monaco" thendo clickText()else if it contains italic thenfind clickText() in bg fld "Topic"if the result is not empty then put the resultend ifend ifend mouseUp</script>
</part>
<content>
<layer>background</layer>
<id>103</id>
<text>Installing WindowScript</text>
</content>
<content>
<layer>card</layer>
<id>1</id>
<text><span class="style28">  WindowScript is not installed.</span><span class="style2">Use the </span><span class="style6">Installation…</span><span class="style2"> button below to add a </span><span class="style6">Window…</span><span class="style2"> item to the menubar.</span><span class="style30"></span><span class="style2">Once installed, choose this menu item in any HyperCard stack to create and modify windows.</span><span class="style30"></span><span class="style2">Click </span><span class="style6">Examples…</span><span class="style2"> to see example windows residing in this stack.</span></text>
</content>
<content>
<layer>card</layer>
<id>5</id>
<text><span class="style28"> WindowScript is already installed.</span></text>
</content>
<name>Installation</name>
<script>on openCardif there is a menuitem "Window…" in menu "Edit"then show cd fld "Is2" else hide cd fld "Is2"pass openCardend openCardon installWSshow cd fld "Is2"pass installWSend installWSon deinstallWShide cd fld "Is2"pass deinstallWSend deinstallWS</script>
</card>
card_2128.xml
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE card PUBLIC "-//Apple, Inc.//DTD card V 2.0//EN" "" >
<script>on mouseUpvisual effect iris open fastif menu "Edit" contains "Window…"then go cd id 10756 else go nextend mouseUp</script>
</part>
<content>
<layer>background</layer>
<id>103</id>
<text>Welcome To WindowScript</text>
</content>
<name>Splash</name>
<script>on openCardif there is a cd fld "Release Notes" thenif visible of cd fld "release notes" is false thenlock screenshow cd fld "release Notes"unlock screen with visual effect iris openend ifend ifpass openCardend openCard</script>